test,doc: cover and document multi-byte offset/size in randomFill - #64834
Open
kyungrae2002 wants to merge 1 commit into
Open
test,doc: cover and document multi-byte offset/size in randomFill#64834kyungrae2002 wants to merge 1 commit into
kyungrae2002 wants to merge 1 commit into
Conversation
Signed-off-by: kyungrae <kyungrae2002@gmail.com>
Collaborator
|
Review requested:
|
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #64834 +/- ##
==========================================
- Coverage 92.01% 90.16% -1.86%
==========================================
Files 381 746 +365
Lines 170167 242764 +72597
Branches 26075 45739 +19664
==========================================
+ Hits 156585 218877 +62292
- Misses 13291 15387 +2096
- Partials 291 8500 +8209 π New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test-crypto-random.jsverifiedoffset/sizeplacement only forsingle-byte buffers (
Buffer/Uint8Array), so the element-to-byteconversion for multi-byte typed arrays was never exercised. The docs for
randomFill()/randomFillSync()documented thesizedefault only asbuffer.length - offset, which is meaningless forArrayBuffer/DataView(no
.length), and never stated the offset/size unit.offset/sizeare in elements for aTypedArrayand inbytes for an
ArrayBuffer/DataView, with the default given per typeUint16Array/Uint32Arrayat a non-zero offset, asserting neighboring elements are untouched
No runtime behavior changes.